package com.secondweek.帮你挑礼物;

import java.util.Scanner;

/**
 * @description: 帮你挑礼物
 * @author: 十月
 * @create: 2020-11-29 11:39
 **/
public class Second {
    /**
     * @Description:根据月份选择礼物
     *@param mounth
     * @return: String
     * @Date: 2020/11/29
     */
    public String selectGift(int mounth)
    {
        String[] gift={"笔","磨","纸","研","水","书","毛衣","围巾","玩具车","玩具飞机","游戏机","贺卡"};
        return gift[mounth-1];
    }
    /**
     * @Description:获取生日年月日，并返回月份
     * @return: int
     * @Date: 2020/11/29
     */
    public int birthday()
    {
        Scanner in=new Scanner(System.in);
        System.out.print("请输入生日年份：");
        int year=in.nextInt();
        System.out.print("请输入生日月份：");
        int mounth=in.nextInt();
        System.out.print("请输入生日日期：");
        int day=in.nextInt();
        System.out.println("您的生日月份为："+year+"-"+mounth+"-"+day);
        return mounth;

    }

    public static void main(String[] args) {
        Second second=new Second();
        int select=second.birthday();
        String gift=second.selectGift(select);
        System.out.println("你选择送出的礼物是："+gift);
    }
}
